{
 "cells": [
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": [
    "对以下数据集进行图像识别。\n",
    "\n",
    "CIFAR10数据集：包含10个类别的RGB图像，每个类别6000张32x32图像。"
   ],
   "id": "3d060db24ea2619d"
  },
  {
   "cell_type": "code",
   "id": "initial_id",
   "metadata": {
    "collapsed": true,
    "ExecuteTime": {
     "end_time": "2025-10-17T03:18:51.284502Z",
     "start_time": "2025-10-17T03:16:42.976165Z"
    }
   },
   "source": [
    "import matplotlib.pyplot as plt\n",
    "from torchvision import datasets\n",
    "\n",
    "# 10个类别的彩色图像\n",
    "train_dataset = datasets.CIFAR10(root='./data', train=True, download=True)\n",
    "test_dataset = datasets.CIFAR10(root='./data', train=False, download=True)\n",
    "print(len(train_dataset))\n",
    "print(len(test_dataset))"
   ],
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 170M/170M [01:56<00:00, 1.46MB/s] \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "50000\n",
      "10000\n"
     ]
    }
   ],
   "execution_count": 1
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
